<extend name="Public/base"/>
<block name="body">
<script>
 $(function(){
   var has_content=$('input:radio[name="has_content"]:checked').val();
   if(has_content==0){
     $("#conter_tpl").hide()
   }
  $('input[name=has_content]').click(function() {
      var has_content=$(this).val();
       if(has_content==1){
        $("#conter_tpl").show()
       }else{
        $("#conter_tpl").hide()
       }
  });
 })
</script>
<div class="widget-box">
          <div class="widget-title"> <span class="icon"> <i class="icon-th"></i> </span>
            <h5>{$meta_title}</h5>
             <div class="buttons">
                 <a class="btn" href="javascript:history.go(-1);">返回</a>
             </div>
           </div>
          <div class="widget-content">
                    <form class="form-horizontal" form action="{:U('Edit')}" method="post">
                                    <div class="control-group">
                                        <label class="control-label">模板名称</label>
                                        <div class="controls">
                                            <input type="text" name="model_name" value="{$info.model_name}">
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">栏目模板前缀</label>
                                        <div class="controls">
                                            <input type="text" name="tpl_channel" value="{$info.tpl_channel}">
                                        </div>
                                    </div>

                                    <div class="control-group" id="conter_tpl">
                                        <label class="control-label">内容模板前缀</label>
                                        <div class="controls">
                                        <input type="text" name="tpl_content" value="{$info.tpl_content}">	
                                        </div>
                                    </div>

                                    <div class="control-group">
                                        <label class="control-label">是否有内容</label>
                                          <div class="controls">
                                            <label><input type="radio" name="has_content" value="1" <if condition="$info['has_content'] eq 1"> checked="checked" </if> > 开启</label>
                                            <label><input type="radio" name="has_content" value="0" <if condition="$info['has_content'] eq 0"> checked="checked" </if> > 关闭</label>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">是否开启</label>
                                          <div class="controls">
                                          <label><input type="radio" name="status" value="1" <if condition="($info['status'] eq 1)"> checked="checked" </if>> 开启</label>
                                            <label><input type="radio" name="status" value="0" <if condition="($info['status'] eq 0)"> checked="checked" </if>> 关闭</label>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">排序</label>
                                        <div class="controls">
                                        <input type="text" name="sort" value="{$info.sort}">  
                                        </div>
                                    </div>
                               <div class="form-actions">
                                <input type="hidden" name="model_id" value="{$info.model_id}">
                               <button class="btn btn-primary" type="submit">保存</button>
                           </div>
                     </form>
          </div>
        </div>
</block>
